package com.onesports.intelligent.k12.polarlight.domain.dto.organization;

import javax.validation.Valid;
import javax.validation.constraints.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import java.math.BigDecimal;

/**
 * @author wangcx
 **/
@Data
@ApiModel("机构端插入校区管理DTO")
public class InsertOrganizationCampusDTO {

    @NotBlank(message = "请输入校区名称")
    @Length(message = "校区名称长度不能大于50",max = 50)
    @ApiModelProperty(value = "校区名称",required = true)
    private String campusName;

    @ApiModelProperty(value = "运营团队id",hidden = true)
    private String organizationId;

    @NotBlank(message = "请输入校区类型")
    @ApiModelProperty(value = "校区类型 1:自检场地 2：社区",required = true)
    private String campusType;

    @ApiModelProperty(value = "等级")
    private String level;

    @Length(message = "详细地址长度不能大于200",max = 200)
    @ApiModelProperty(value = "详细地址")
    private String address;

    @NotBlank(message = "请输入校区负责人")
    @Length(message = "校区负责人长度不能大于20",max = 20)
    @ApiModelProperty(value = "校区负责人",required = true)
    private String principal;

    @NotBlank(message = "请输入校区负责人手机号")
    @ApiModelProperty(value = "校区负责人手机号",required = true)
    @Length(max = 11,message = "手机号不可以超过11位")
    private String phoneNumber;

    @NotBlank(message = "请输入省")
    @ApiModelProperty(value = "省",required = true)
    private String province;

    @NotBlank(message = "请输入市")
    @ApiModelProperty(value = "市",required = true)
    private String city;

    @NotBlank(message = "请输入区")
    @ApiModelProperty(value = "区",required = true)
    private String area;

    @ApiModelProperty(value = "图片地址")
    private String imageUrl;

    @NotNull(message = "请输入分账比例")
    @Min(value = 0,message = "最小为0")
    @Max(value = 100,message = "最大为100")
    @ApiModelProperty(value = "分账比例",required = true)
    private BigDecimal subRatio;

    @NotBlank(message = "请输入经度")
    @ApiModelProperty(value = "经度",required = true)
    private String lng;

    @NotBlank(message = "请输入纬度")
    @ApiModelProperty(value = "纬度",required = true)
    private String lat;

    @ApiModelProperty(value = "拼单数量")
    private Integer classNum;

}
